1. Field
The disclosed embodiments relate to flow control in networks. More specifically, the disclosed embodiments relate to techniques for providing flow control for network packets from electronic devices to network links in the networks.
2. Related Art
Network links such as wireless access points, cell towers, and/or routers may be shared by a number of network-enabled electronic devices such as personal computers, laptop computers, mobile phones, portable media players, printers, and/or video game consoles. To manage network traffic to the electronic devices, the network links may reduce the flow of packets to the electronic devices, reorder the packets, and/or drop the packets. Senders of the packets may also adjust the rate of transmission of subsequent packets based on packet errors, losses, and/or delays, thus lifting congestion at the network links and facilitating sharing of the network bandwidth by the electronic devices.
On the other hand, the electronic devices may lack the ability to control the flow of network packets from applications on the electronic devices to the network links. For example, multiple applications on an electronic device may place outgoing packets into a best-effort network interface queue for subsequent transmission of the outgoing packets to a network link connected to the electronic device. An aggressive application may consume available bandwidth on the network link by continuously placing outgoing packets into the network interface queue at or above the outgoing rate at which the outgoing packets are transmitted from the network interface queue to the network link. In addition, other applications may not get a chance to fill the network interface queue until the rate at which the aggressive application places outgoing packets into the network interface queue drops below the outgoing rate. As a result, the aggressive application may starve the other applications, causing the other applications to experienced increased latency on the network and, in turn, reduced performance.